package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysMemberLevelMapper;
import com.ruoyi.system.domain.SysMemberLevel;
import com.ruoyi.system.service.ISysMemberLevelService;

/**
 * 会员等级Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-22
 */
@Service
public class SysMemberLevelServiceImpl implements ISysMemberLevelService 
{
    @Autowired
    private SysMemberLevelMapper sysMemberLevelMapper;

    /**
     * 查询会员等级
     * 
     * @param levelId 会员等级主键
     * @return 会员等级
     */
    @Override
    public SysMemberLevel selectSysMemberLevelByLevelId(Long levelId)
    {
        return sysMemberLevelMapper.selectSysMemberLevelByLevelId(levelId);
    }

    /**
     * 查询会员等级列表
     * 
     * @param sysMemberLevel 会员等级
     * @return 会员等级
     */
    @Override
    public List<SysMemberLevel> selectSysMemberLevelList(SysMemberLevel sysMemberLevel)
    {
        return sysMemberLevelMapper.selectSysMemberLevelList(sysMemberLevel);
    }

    /**
     * 新增会员等级
     * 
     * @param sysMemberLevel 会员等级
     * @return 结果
     */
    @Override
    public int insertSysMemberLevel(SysMemberLevel sysMemberLevel)
    {
        return sysMemberLevelMapper.insertSysMemberLevel(sysMemberLevel);
    }

    /**
     * 修改会员等级
     * 
     * @param sysMemberLevel 会员等级
     * @return 结果
     */
    @Override
    public int updateSysMemberLevel(SysMemberLevel sysMemberLevel)
    {
        return sysMemberLevelMapper.updateSysMemberLevel(sysMemberLevel);
    }

    /**
     * 批量删除会员等级
     * 
     * @param levelIds 需要删除的会员等级主键
     * @return 结果
     */
    @Override
    public int deleteSysMemberLevelByLevelIds(Long[] levelIds)
    {
        return sysMemberLevelMapper.deleteSysMemberLevelByLevelIds(levelIds);
    }

    /**
     * 删除会员等级信息
     * 
     * @param levelId 会员等级主键
     * @return 结果
     */
    @Override
    public int deleteSysMemberLevelByLevelId(Long levelId)
    {
        return sysMemberLevelMapper.deleteSysMemberLevelByLevelId(levelId);
    }
}
